import request from '@/utils/request'
export default {

  /* GET /admin/product/{page}/{limit}
  index */
  GetSpuList(page,limit,category3Id){
      return request({
        url:`/admin/product/${page}/${limit}`,
        method:"get",
        params:{category3Id}
      })
  },
  /* GET /admin/product/baseSaleAttrList
  getBaseSaleAttrList */
  getBaseSaleAttrList(){
    return request({
      method:'get',
      url:"/admin/product/baseSaleAttrList"
    })
  },

  /* DELETE /admin/product/deleteSpu/{spuId}
  deleteSpu */
  deleteSpu(spuId) {
    return request.delete(`/admin/product/deleteSpu/${spuId}`)
  },


  /*  GET /admin/product/findSpuInfoByKeyword/{keyword}
   findSpuInfoByKeyword */

  /* GET /admin/product/getSpuById/{spuId}
  获取spu基本信息 */
  GetSpuInfo(spuId) {
    return request.get(`/admin/product/getSpuById/${spuId}`)
  },



  /* POST /admin/product/inner/findSpuInfoBySpuIdList
  findSpuInfoBySpuIdList */

  /* POST /admin/product/saveSpuInfo
  saveSpuInfo */
  saveSpuInfo(SpuInfo){
    return request({
      url:`/admin/product/${SpuInfo.id?'update':'save'}SpuInfo`,
      method:"post",
      data:SpuInfo
    })
  }

  /* POST /admin/product/updateSpuInfo
  更改spu信息 */




}
